package edu.sctu.renpingan.day20150512.text1;

/**
 * Created by user18 on 2015/5/12.
 */
public class TextThere extends TextOne {
    private int number;
    private String action;
    private String color;

    public TextThere(int number, String action, String color) {
        this.number = number;
        this.action = action;
        this.color = color;

    }

    @Override
    public void getNumber() {
        if(number==1111){
            System.out.println("学号"+":"+number);
        }else {
            System.out.println("其他学号");
        }
    }

    @Override
    public void getAction() {
        if(action.equals("run")){
            System.out.println("动作"+":"+action);
        }else {
            System.out.println("其他动作");
        }
    }

    @Override
    public void getColor() {
        if(color.equals("red")){
            System.out.println("颜色"+":"+color);
        }else {
            System.out.println("其他颜色");
        }
    }
}
